package com.fast.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fast.pojo.entity.SysUserDo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @author Administrator
 * @description 针对表【sys_user(用户信息表)】的数据库操作Mapper
 * @fileName com.fast.pojo.entity.SysUserDo
 * @since 2024-06-23 09:44:12
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUserDo> {
    /**
     * select by primary key
     *
     * @param userId primary key
     * @return object by primary key
     */
    SysUserDo getUserInfoById(String userId);

    /**
     * delete by primary key
     *
     * @param userId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(String userId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(SysUserDo record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(SysUserDo record);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(SysUserDo record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(SysUserDo record);

    /**
     * 根据用户账号获取用户信息
     *
     * @param username 用户名称
     * @return 用户信息
     */
    SysUserDo userInfoByUserName(@Param("username") String username);
}




